home *** CD-ROM | disk | FTP | other *** search
/ Merciful 2 / Merciful - Disc 2.iso / software / h / highspeedpascalv2.0b.dms / highspeedpascalv2.0b.adf / Interface / Console.pas < prev    next >
Pascal/Delphi Source File  |  1992-01-16  |  3KB  |  128 lines

  1. Unit Console;
  2.  
  3. Interface
  4. Uses Intuition, Graphics, Keymap, Input, Exec;
  5.  
  6. Type
  7.   pWindow = ^tWindow;
  8.   pTextFont = ^tTextFont;
  9.   tConUnit = Record
  10.           cu_MP: tMsgPort;
  11.           cu_Window: pWindow;
  12.           cu_XCP: Integer;
  13.           cu_YCP: Integer;
  14.           cu_XMax: Integer;
  15.           cu_YMax: Integer;
  16.           cu_XRSize: Integer;
  17.           cu_YRSize: Integer;
  18.           cu_XROrigin: Integer;
  19.           cu_YROrigin: Integer;
  20.           cu_XRExtant: Integer;
  21.           cu_YRExtant: Integer;
  22.           cu_XMinShrink: Integer;
  23.           cu_YMinShrink: Integer;
  24.           cu_XCCP: Integer;
  25.           cu_YCCP: Integer;
  26.           cu_KeyMapStruct: tKeyMap;
  27.           cu_TabStops: Array [0..79] of Integer;
  28.           cu_Mask: ShortInt;
  29.           cu_FgPen: ShortInt;
  30.           cu_BgPen: ShortInt;
  31.           cu_AOLPen: ShortInt;
  32.           cu_DrawMode: ShortInt;
  33.           cu_AreaPtSz: ShortInt;
  34.           cu_AreaPtrn: Pointer;
  35.           cu_Minterms: Array [0..7] of ShortInt;
  36.           cu_Font: pTextFont;
  37.           cu_AlgoStyle: ShortInt;
  38.           cu_TxFlags: ShortInt;
  39.           cu_TxHeight: Integer;
  40.           cu_TxWidth: Integer;
  41.           cu_TxBaseline: Integer;
  42.           cu_TxSpacing: Integer;
  43.           cu_Modes: Array [0..2] of ShortInt;
  44.           cu_RawEvents: Array [0..2] of ShortInt;
  45.         End;
  46.  
  47.   pLibrary = ^tLibrary;
  48.   pInputEvent = ^tInputEvent;
  49.   pKeyMap = ^tKeyMap;
  50.   pDevice = ^tDevice;
  51.  
  52.  
  53. Var
  54.   ConsoleDevice: pLibrary;
  55.  
  56.  
  57. Const
  58.   SGR_CLR2 = $20;
  59.   SGR_CLR3 = $21;
  60.   SGR_CLR4 = $22;
  61.   SGR_CLR5 = $23;
  62.   SGR_CLR6 = $24;
  63.   SGR_CLR7 = $25;
  64.   SGR_WHITE = $25;
  65.   SGR_BLACKBG = $28;
  66.   CD_ASKDEFAULTKEYMAP = $B;
  67.   CD_SETKEYMAP = $A;
  68.   TBC_HCLRTABSALL = $3;
  69.   SGR_BOLD = $1;
  70.   CTC_HCLRTABSALL = $5;
  71.   TBC_HCLRTAB = $0;
  72.   SGR_NEGATIVE = $7;
  73.   CTC_HCLRTAB = $2;
  74.   SGR_BLUE = $22;
  75.   MAXTABS = $50;
  76.   CD_SETDEFAULTKEYMAP = $C;
  77.   SGR_CYAN = $24;
  78.   CTC_HSETTAB = $0;
  79.   SGR_GREENBG = $2A;
  80.   SGR_MAGENTA = $23;
  81.   SGR_CLR0BG = $28;
  82.   SGR_YELLOWBG = $2B;
  83.   SGR_CLR1BG = $29;
  84.   SGR_CLR2BG = $2A;
  85.   SGR_CLR3BG = $2B;
  86.   SGR_CLR4BG = $2C;
  87.   PMB_ASM = $15;
  88.   SGR_CLR5BG = $2D;
  89.   SGR_DEFAULT = $27;
  90.   SGR_CLR6BG = $2E;
  91.   SGR_CLR7BG = $2F;
  92.   PMB_AWM = $16;
  93.   SGR_RED = $1F;
  94.   SGR_WHITEBG = $2F;
  95.   DSR_CPR = $6;
  96.   SGR_BLUEBG = $2C;
  97.   SGR_CYANBG = $2E;
  98.   SGR_ITALIC = $3;
  99.   SGR_MAGENTABG = $2D;
  100.   SGR_PRIMARY = $0;
  101.   SGR_BLACK = $1E;
  102.   SGR_DEFAULTBG = $31;
  103.   SGR_REDBG = $29;
  104.   SGR_UNDERSCORE = $4;
  105.   SGR_GREEN = $20;
  106.   M_ASM = '>1';
  107.   M_AWM = '?7';
  108.   SGR_CLR0 = $1E;
  109.   CD_ASKKEYMAP = $9;
  110.   SGR_YELLOW = $21;
  111.   SGR_CLR1 = $1F;
  112.   M_LNM = $14;
  113.  
  114.  
  115. Function CDInputHandler
  116.          (events: pInputEvent;
  117.           device: pDevice): pInputEvent;
  118.  
  119. Function RawKeyConvert
  120.          (events: pInputEvent;
  121.           buffer: pShortInt;
  122.           length: LongInt;
  123.           keyMap: pKeyMap): LongInt;
  124.  
  125.  
  126.  
  127. End.
  128.